<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../../../style.css" type="text/css" media="screen">
<link rel="stylesheet" href="../../../print.css" type="text/css" media="print">
<meta content="FormValidate,jp.raohmaru.form.FormValidate,passwordMinLength,confirmFields,isEmpty,isNumber,validateAge,validateDate,validateElement,validateEmail,validateMobile,validateNIF,validatePassword,validatePhone,validatePostalCode" name="keywords">
<title>jp.raohmaru.form.FormValidate</title>
</head>
<body>
<script type="text/javascript" language="javascript" src="../../../asdoc.js"></script><script type="text/javascript" language="javascript" src="../../../cookies.js"></script><script type="text/javascript" language="javascript">
<!--
				asdocTitle = 'FormValidate - Raohmaru AS3 Framework';
				var baseRef = '../../../';
				window.onload = configPage;
			--></script>
<table style="display:none" id="titleTable" cellspacing="0" cellpadding="0" class="titleTable">
<tr>
<td align="left" class="titleTableTitle">Raohmaru AS3 

Framework</td><td align="right" class="titleTableTopNav"><a onclick="loadClassListFrame('../../../all-classes.html')" href="../../../package-summary.html">All&nbsp;Packages</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../../all-classes.html')" href="../../../class-summary.html">All&nbsp;Classes</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../../index-list.html')" href="../../../all-index-A.html">Index</a>&nbsp;|&nbsp;<a href="../../../index.html?jp/raohmaru/form/FormValidate.html&amp;jp/raohmaru/form/class-list.html" id="framesLink1">Frames</a><a onclick="parent.location=document.location" href="" style="display:none" id="noFramesLink1">No&nbsp;Frames</a></td><td rowspan="3" align="right" class="titleTableLogo"><img alt="Adobe Logo" title="Adobe Logo" class="logoImage" src="../../../images/logo.jpg"></td>
</tr>
<tr class="titleTableRow2">
<td align="left" id="subTitle" class="titleTableSubTitle">Class&nbsp;FormValidate</td><td align="right" id="subNav" class="titleTableSubNav"><a href="#propertySummary">Properties</a>&nbsp;| <a href="#methodSummary">Methods</a></td>
</tr>
<tr class="titleTableRow3">
<td colspan="2">&nbsp;</td>
</tr>
</table>
<script type="text/javascript" language="javascript">
<!--
if (!isEclipse() || window.name != ECLIPSE_FRAME_NAME) {titleBar_setSubTitle("Class FormValidate"); titleBar_setSubNav(false,true,false,false,false,false,true,false,false,false,false,false,false,false);}
--></script>
<div class="MainContent">
<table cellspacing="0" cellpadding="0" class="classHeaderTable">
<tr>
<td class="classHeaderTableLabel">Package</td><td><a onclick="javascript:loadClassListFrame('class-list.html')" href="package-detail.html">jp.raohmaru.form</a></td>
</tr>
<tr>
<td class="classHeaderTableLabel">Class</td><td class="classSignature">public class FormValidate</td>
</tr>
</table>
<p></p>
 La clase FormValidate valida datos de entrada de formulario, del tipo TextField.
 <p></p>
<br>
<hr>
</div>
<a name="propertySummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Properties</div>
<table id="summaryTableProperty" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Property</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#passwordMinLength">passwordMinLength</a> : uint<div class="summaryTableDescription">[static]
  Establece la longitud mínima para un campo de contraseña.</div>
</td><td class="summaryTableOwnerCol">FormValidate</td>
</tr>
</table>
</div>
<a name="methodSummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Methods</div>
<table id="summaryTableMethod" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Method</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#confirmFields()">confirmFields</a>(element:TextField):Boolean</div>
<div class="summaryTableDescription">[static]
  Valida que el contenido de un objeto TextField con nombre acabado en "_confirm" sea igual al de otro TextField sin la coletilla "_confirm" en el nombre.</div>
</td><td class="summaryTableOwnerCol">FormValidate</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#isEmpty()">isEmpty</a>(str:String):Boolean</div>
<div class="summaryTableDescription">[static]
  Comprueba que la cadena de texto no esté vacía.</div>
</td><td class="summaryTableOwnerCol">FormValidate</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#isNumber()">isNumber</a>(str:String):Boolean</div>
<div class="summaryTableDescription">[static]
  Comprueba que la cadena de texto sea un valor numérico válido.</div>
</td><td class="summaryTableOwnerCol">FormValidate</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#validateAge()">validateAge</a>(birth:Date, now:Date = null, age:uint = 18):Boolean</div>
<div class="summaryTableDescription">[static]
  Valida que la fecha de nacimiento corresponda a una persona mayor de edad (en España mayor de 18 años).</div>
</td><td class="summaryTableOwnerCol">FormValidate</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#validateDate()">validateDate</a>(str:String, format:String = "dd/mm/yyyy"):Boolean</div>
<div class="summaryTableDescription">[static]
  Valida que la una fecha sea correcta y coincida con el patrón especificado.</div>
</td><td class="summaryTableOwnerCol">FormValidate</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#validateElement()">validateElement</a>(str:String, type:String, element:TextField = null):Boolean</div>
<div class="summaryTableDescription">[static]
  Valida un elemento según el tipo especificado.</div>
</td><td class="summaryTableOwnerCol">FormValidate</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#validateEmail()">validateEmail</a>(str:String):Boolean</div>
<div class="summaryTableDescription">[static]
  Valida que una cadena de texto tenga formato de un e-mail.</div>
</td><td class="summaryTableOwnerCol">FormValidate</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#validateMobile()">validateMobile</a>(str:String):Boolean</div>
<div class="summaryTableDescription">[static]
  Valida que una cadena de texto tenga formato de móvil (para el ámbito español, esto es, que empiece por 6).</div>
</td><td class="summaryTableOwnerCol">FormValidate</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#validateNIF()">validateNIF</a>(str:String):Boolean</div>
<div class="summaryTableDescription">[static]
  Comprueba si el numero de NIE o NIF es correcto y la última letra corresponde con el número.</div>
</td><td class="summaryTableOwnerCol">FormValidate</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#validatePassword()">validatePassword</a>(str:String):Boolean</div>
<div class="summaryTableDescription">[static]
  Valida la longitud de un password contrastada con passwordMinLength.</div>
</td><td class="summaryTableOwnerCol">FormValidate</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#validatePhone()">validatePhone</a>(str:String):Boolean</div>
<div class="summaryTableDescription">[static]
  Valida que una cadena de texto tenga formato de número de teléfono (para el ámbito español, esto es, que empiece por 8 ó 9).</div>
</td><td class="summaryTableOwnerCol">FormValidate</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#validatePostalCode()">validatePostalCode</a>(str:String):Boolean</div>
<div class="summaryTableDescription">[static]
  Valida que una cadena de texto tenga formato de código postal (para el ámbito español).</div>
</td><td class="summaryTableOwnerCol">FormValidate</td>
</tr>
</table>
</div>
<script type="text/javascript" language="javascript">
<!--
showHideInherited();
--></script>
<div class="MainContent">
<a name="propertyDetail"></a>
<div class="detailSectionHeader">Property detail</div>
<a name="passwordMinLength"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">passwordMinLength</td><td class="detailHeaderType">property</td>
</tr>
</table>
<div class="detailBody">
<code>passwordMinLength:uint</code>&nbsp;&nbsp;[read-write]<p>
  Establece la longitud mínima para un campo de contraseña. El valor por defecto es 4.
  </p><span class="label">Implementation</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public static function get passwordMinLength():uint</code>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function set passwordMinLength(value:uint):void</code>
<br>
<p>
<span class="label">See also</span>
</p>
<div class="seeAlso">
<a href="../form/FormValidate.html#validatePassword()" target="">validatePassword()</a>
</div>
</div>
<a name="methodDetail"></a>
<div class="detailSectionHeader">Method detail</div>
<a name="confirmFields()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">confirmFields</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td>
</tr>
</table>
<div class="detailBody">
<code>public static function confirmFields(element:TextField):Boolean</code><p>
  Valida que el contenido de un objeto TextField con nombre acabado en "_confirm" sea igual al de otro TextField sin la coletilla "_confirm" en el nombre.
  </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">element</span>:TextField</code> &mdash; TextField a validar
  </td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>Boolean</code> &mdash; El resultado de la validación
  </td>
</tr>
</table>
<br>
<span class="label">Example</span>
<br> <div class='listing'><pre>
 import jp.raohmaru.form.FormType;
 import jp.raohmaru.form.Form;
 import flash.text.TextField;<br>
 var city : TextField = new TextField();
 city.name = "city";
 city.text = "Berna";
 var city_confirm : TextField = new TextField();
 city_confirm.name = "city_confirm";
 city_confirm.text = "Zurich";
 Form.confirmFields(city); // false</pre></div>
  <p></p>
</div>
<a name="isEmpty()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">isEmpty</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public static function isEmpty(str:String):Boolean</code><p>
  Comprueba que la cadena de texto no esté vacía.
  </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">str</span>:String</code> &mdash; Cadena a comprobar.
  </td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>Boolean</code> &mdash; Obtiene <code>true</code> si está vacía, <code>false</code> en caso contrario.
  </td>
</tr>
</table>
</div>
<a name="isNumber()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">isNumber</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public static function isNumber(str:String):Boolean</code><p>
  Comprueba que la cadena de texto sea un valor numérico válido.
  </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">str</span>:String</code> &mdash; Cadena a comprobar.
  </td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>Boolean</code> &mdash; Obtiene <code>true</code> si es un número, <code>false</code> en caso contrario.
  </td>
</tr>
</table>
</div>
<a name="validateAge()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">validateAge</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public static function validateAge(birth:Date, now:Date = null, age:uint = 18):Boolean</code><p>
  Valida que la fecha de nacimiento corresponda a una persona mayor de edad (en España mayor de 18 años).
  </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">birth</span>:Date</code> &mdash; Objeto Date que contiene una fecha de nacimiento
  </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">now</span>:Date</code> (default = <code>null</code>)<code></code> &mdash; Un valor para la fecha actual, que se utilizará para validar contra la fecha de nacimiento. Por defecto será la fecha del ordenador del usuario.
  </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">age</span>:uint</code> (default = <code>18</code>)<code></code></td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>Boolean</code> &mdash; El resultado de la validación (<code>true</code> si es mayor de edad).
  </td>
</tr>
</table>
</div>
<a name="validateDate()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">validateDate</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public static function validateDate(str:String, format:String = "dd/mm/yyyy"):Boolean</code><p>
  Valida que la una fecha sea correcta y coincida con el patrón especificado. Los caracteres especiales deben ir separados entre ellos por el mismo
  caracter separador, y los grupos de caracteres especiales deben ir separados por un espacio.
  Caracteres especiales:<br><br>
<table class="innertable">
<tr>
 <th width="84"><b>Caracter especial</b></th>
 <th width="391">Descripci&oacute;n</th>
</tr>
<tr>
 <td><b>d</b></td>
 <td>D&iacute;a del mes sin ceros iniciales</td>
</tr>
<tr>
 <td><b>dd</b></td>
 <td>D&iacute;a del mes con ceros iniciales</td>
</tr>
<tr>
 <td><b>m</b></td>
 <td>Representaci&oacute;n num&eacute;rica de un mes, sin ceros iniciales</td>
</tr>
<tr>
 <td><b>mm</b></td>
 <td>Representaci&oacute;n num&eacute;rica de un mes, con ceros iniciales</td>
</tr>
<tr>
 <td><b>yy</b></td>
 <td>Una representaci&oacute;n de dos d&iacute;gitos de un a&ntilde;o</td>
</tr>
<tr>
 <td><b>yyyy</b></td>
 <td>Una representaci&oacute;n num&eacute;rica completa de un a&ntilde;o</td>
</tr>
<tr>
 <td><b>H</b></td>
 <td>Formato de 24-horas de una hora sin ceros iniciales</td>
</tr>
<tr>
 <td><b>HH</b></td>
 <td>Formato de 24-horas de una hora con ceros iniciales</td>
</tr>
<tr>
 <td><b>M</b></td>
 <td>Minutos sin ceros iniciales</td>
</tr>
<tr>
 <td><b>MM</b></td>
 <td>Minutos con ceros iniciales</td>
</tr>
<tr>
 <td><b>S</b></td>
 <td>Segunds sin ceros iniciales</td>
</tr>
<tr>
 <td><b>SS</b></td>
 <td>Segunds con ceros iniciales</td>
</tr>
</table>
  </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">str</span>:String</code> &mdash; Cadena a comprobar.
  </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">format</span>:String</code> (default = "<code>dd/mm/yyyy</code>")<code></code> &mdash; El patrón que debe seguir la cadena.
  </td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>Boolean</code> &mdash; El resultado de la validación.
  </td>
</tr>
</table>
<br>
<span class="label">Example</span>
<br> <div class='listing'><pre>
 import jp.raohmaru.form.FormValidate;
  
 FormValidate.validateDate("01/01/1988");  // true
 FormValidate.validateDate("1/10/95", "d/m/yy");  // true
 FormValidate.validateDate("01-31-1288 22:50:31", "mm-dd-yyyy HH:MM:SS");  // true
 </pre></div>
  <p></p>
</div>
<a name="validateElement()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">validateElement</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public static function validateElement(str:String, type:String, element:TextField = null):Boolean</code><p>
  Valida un elemento según el tipo especificado.
  </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">str</span>:String</code> &mdash; Cadena de texto a validar
  </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">type</span>:String</code> &mdash; El tipo de validación que se ejecutará
  </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">element</span>:TextField</code> (default = <code>null</code>)<code></code> &mdash; Un objeto TextField para una validación del tipo FormType.CONFIRM
  </td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>Boolean</code> &mdash; El resultado de la validación
  </td>
</tr>
</table>
<p>
<span class="label">See also</span>
</p>
<div class="seeAlso">jp.raohmaru.form.FormType</div>
<br>
<span class="label">Example</span>
<br> <div class='listing'><pre>
 import jp.raohmaru.form.FormType;
 import jp.raohmaru.form.Form;<br>
 Form.validateElement("test&#64;example.org", FormType.EMAIL);</pre></div>
  <p></p>
</div>
<a name="validateEmail()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">validateEmail</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public static function validateEmail(str:String):Boolean</code><p>
  Valida que una cadena de texto tenga formato de un e-mail.
  </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">str</span>:String</code> &mdash; Cadena que contiene un e-mail
  </td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>Boolean</code> &mdash; El resultado de la validación
  </td>
</tr>
</table>
</div>
<a name="validateMobile()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">validateMobile</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public static function validateMobile(str:String):Boolean</code><p>
  Valida que una cadena de texto tenga formato de móvil (para el ámbito español, esto es, que empiece por 6).
  </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">str</span>:String</code> &mdash; Cadena que contiene un número de móvil
  </td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>Boolean</code> &mdash; El resultado de la validación
  </td>
</tr>
</table>
</div>
<a name="validateNIF()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">validateNIF</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public static function validateNIF(str:String):Boolean</code><p>
  Comprueba si el numero de NIE o NIF es correcto y la última letra corresponde con el número.
  </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">str</span>:String</code> &mdash; Una cadena con el numero de nie ((X || T)  + 8 numeros + una letra) o nif (8 numeros + una letra)
  </td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>Boolean</code> &mdash; Boolean
    </td>
</tr>
</table>
</div>
<a name="validatePassword()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">validatePassword</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public static function validatePassword(str:String):Boolean</code><p>
  Valida la longitud de un password contrastada con passwordMinLength.
  </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">str</span>:String</code> &mdash; Cadena de texto
  </td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>Boolean</code> &mdash; El resultado de la validación
  </td>
</tr>
</table>
<p>
<span class="label">See also</span>
</p>
<div class="seeAlso">
<a href="../form/FormValidate.html#passwordMinLength" target="">passwordMinLength</a>
</div>
<br>
<span class="label">Example</span>
<br> <div class='listing'><pre>
 import jp.raohmaru.form.Form;<br>
 Form.passwordMinLength = 6;
 Form.validatePassword("sun"); // false</pre></div>
  <p></p>
</div>
<a name="validatePhone()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">validatePhone</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public static function validatePhone(str:String):Boolean</code><p>
  Valida que una cadena de texto tenga formato de número de teléfono (para el ámbito español, esto es, que empiece por 8 ó 9).
  </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">str</span>:String</code> &mdash; Cadena que contiene un número teléfono
  </td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>Boolean</code> &mdash; El resultado de la validación
  </td>
</tr>
</table>
</div>
<a name="validatePostalCode()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">validatePostalCode</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public static function validatePostalCode(str:String):Boolean</code><p>
  Valida que una cadena de texto tenga formato de código postal (para el ámbito español).
  </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">str</span>:String</code> &mdash; Cadena que contiene un número de código postal
  </td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>Boolean</code> &mdash; El resultado de la validación
  </td>
</tr>
</table>
</div>
<br>
<br>
<hr>
<br>
<p></p>
<center class="copyright">http://www.raohmaru.com</center>
</div>
</body>
</html>
<!--http://www.raohmaru.com-->
